package com.woniuxy.commons.service;

/**
 * @author： 雷鹏
 * Date: 2020/7/21 22:58
 */
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import com.woniuxy.commons.dto.AuthDto;

@FeignClient(name = "AUTH")
public interface RemoteAuthService {
    // 刷新token，生成新的token
    @PostMapping("/refresh/{refreshToken}")
    public AuthDto refresh(@PathVariable("refreshToken") String refreshToken);


    @PostMapping("/hasRole/{refreshToken}/{role}")
    public boolean hasRole(@PathVariable("refreshToken") String refreshToken, @PathVariable("role") String role);

}
